from pydantic import BaseModel
from typing import Optional
from datetime import datetime

# 心愿基本模型
class WishBase(BaseModel):
    title: str
    content: str
    status: Optional[int] = 0  # 0: 未完成, 1: 已完成

# 创建心愿请求体
class WishCreate(WishBase):
    pass

# 心愿响应模型
class WishResponse(WishBase):
    id: int
    user_id: int
    created_at: datetime
    updated_at: datetime

    class Config:
        from_attributes = True

# 心愿更新请求体
class WishUpdate(BaseModel):
    title: Optional[str] = None
    content: Optional[str] = None
    status: Optional[int] = None 